package com.hfi.anemicVsdomain.ddd;

/**
 * @author ChangLiang
 * @date 2020/5/18
 */
public class CompleteRecognitionStrategy implements RecognitionStrategy {
    @Override
    public void calculateRevenueRecognition(Contract contract) {
        contract.addRevenueRecognition(
                RevenueRecognition.builder()
                        .contractId(contract.getId())
                        .amount(contract.getRevenue())
                        .recognizedDate(contract.getSignedDate()).build());
    }
}
